package com.ybwh.springboot2.flowable;

import org.flowable.engine.ProcessEngine;
import org.flowable.engine.ProcessEngineConfiguration;
import org.flowable.engine.impl.cfg.StandaloneProcessEngineConfiguration;

public class HolidayRequest {
	public static void main(String[] args) {
		// 1、创建ProcessEngineConfiguration实例,该实例可以配置与调整流程引擎的设置
		ProcessEngineConfiguration cfg = new StandaloneProcessEngineConfiguration()
				// 2、通常采用xml配置文件创建ProcessEngineConfiguration，这里直接采用代码的方式
				// 3、配置数据库相关参数
				.setJdbcUrl(
						"jdbc:mysql://localhost:3306/flowable_demo?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2b8&nullCatalogMeansCurrent=true")
				.setJdbcUsername("root").setJdbcPassword("root").setJdbcDriver("com.mysql.jdbc.Driver")
				.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE);
		// 4、初始化ProcessEngine流程引擎实例
		ProcessEngine processEngine = cfg.buildProcessEngine();
	}
}